package com.black.system.domain.req.monitor.query;

import cn.hutool.core.util.StrUtil;
import com.black.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * @author L
 */
@Getter
@Setter
@ApiModel(value = "SysOperLogQueryReq", description = "操作日志查询请求对象")
public class SysOperLogQueryReq extends PageAbstructReq {

    @ApiModelProperty(value = "操作地址")
    private String operIp;

    @ApiModelProperty(value = "系统模块")
    private String title;

    @ApiModelProperty(value = "操作人员")
    private String operName;

    @ApiModelProperty(value = "业务类型（0其它 1新增 2修改 3删除）")
    private Integer businessType;

    @ApiModelProperty(value = "操作状态（0正常 1异常）")
    private Integer status;

    @ApiModelProperty(value = "开始时间")
    private String beginTime;

    @ApiModelProperty(value = "结束时间")
    private String endTime;


    @ApiModelProperty(hidden = true)
    @Override
    public String getOrderBy() {
        if (StrUtil.isNotBlank(super.getOrderByColumn())) {
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
